import { viteMockServe } from 'vite-plugin-mock'

export function viteMock(env) {
  const { VITE_APP_ENV } = env

  return viteMockServe({
    mockPath: 'mock', // mock文件夹路径
    enable: VITE_APP_ENV === 'development', // 只有开发环境才开启mock
  })
}
